package com.shujia.userprofile.info.platform

import com.shujia.utils.SparkTool
import org.apache.spark.sql.{DataFrame, SparkSession}

object UserIDTag extends SparkTool{
  tableName = "user_info"
  columnFamily = "platform"
  tagName = "memberId"

  override def extractData(spark: SparkSession): DataFrame = {
    import spark.implicits._

    spark
      .table("dim.dim_pub_user_info_d_f")
      .where($"pt"===pt)
      .select($"id".cast("String")
      ,$"id".cast("String") as "memberId")
  }

}
